<script setup>
import MyCounter from './MyCounter.vue'
// import MyCounter2 from './MyCounter2.vue'
import { ref } from 'vue'

const num = ref(0)
const msg = ref('hello')
</script>

<template>
  <h1>Index 组件 --- {{ num }}</h1>
  <button @click="num++">+1</button>
  <button @click="num--">-1</button>
  <input type="text" v-model="msg" />
  <hr />
  <MyCounter v-model:numb="num" v-model:msg="msg" />
  <!-- <MyCounter2 :model-value="num" @update:model-value="(val) => (num = val)" /> -->
</template>
